<html>
<head><meta charset="utf-8"><title>Error Compiling on windows - LLVM · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Error.20Compiling.20on.20windows.20-.20LLVM.html">Error Compiling on windows - LLVM</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="236973917"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Error%20Compiling%20on%20windows%20-%20LLVM/near/236973917" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ori Ben-Shir <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Error.20Compiling.20on.20windows.20-.20LLVM.html#236973917">(May 01 2021 at 14:57)</a>:</h4>
<p>I'm trying to build the Rust compiler and I'm getting the following error during the compilation of LLVM:</p>
<p>ninja: error: 'E:/Development/rust/src/llvm-project/llvm/lib/Demangle/Demangle.cpp', needed by 'lib/Demangle/CMakeFiles/LLVMDemangle.dir/Demangle.cpp.obj', missing and no known rule to make it</p>
<p>Environment Details:<br>
Compiler: VS 2019<br>
Ninja: 1.10.2<br>
cmake: 3.18.5</p>
<p>The file Demangle.cpp is there. I also managed to build the rust code itself (x.py check is working)<br>
Any idea what went wrong?</p>



<a name="236975141"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Error%20Compiling%20on%20windows%20-%20LLVM/near/236975141" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Error.20Compiling.20on.20windows.20-.20LLVM.html#236975141">(May 01 2021 at 15:04)</a>:</h4>
<p>Not sure, but you should be able to avoid building llvm by setting <code>download-ci-llvm = ttue</code></p>



<a name="236978273"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Error%20Compiling%20on%20windows%20-%20LLVM/near/236978273" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ori Ben-Shir <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Error.20Compiling.20on.20windows.20-.20LLVM.html#236978273">(May 01 2021 at 15:44)</a>:</h4>
<p>Thanks, I was hoping to build LLVM as well. I know Rust is using a different branch of LLVM, but I tried to build it from their master to find out where the problem is, and it is failing on LLVM master as well. So I'll try to find out if there is any information regarding it in the LLVM community.</p>



<a name="236978610"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Error%20Compiling%20on%20windows%20-%20LLVM/near/236978610" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Error.20Compiling.20on.20windows.20-.20LLVM.html#236978610">(May 01 2021 at 15:49)</a>:</h4>
<p>A coworker hit a similar issue last week and we were able to work around it by disabling ninja (<code>ninja = false</code>) in config.toml.</p>



<a name="237216129"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Error%20Compiling%20on%20windows%20-%20LLVM/near/237216129" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ori Ben-Shir <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Error.20Compiling.20on.20windows.20-.20LLVM.html#237216129">(May 03 2021 at 19:34)</a>:</h4>
<p>Small update for future reference: It seems like Ninja is having trouble working with non-default drive. When trying to build from the C:/ drive, it went through this error. If I find a workaround to work with a non-default drive, I'll update it here</p>



<a name="237364980"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Error%20Compiling%20on%20windows%20-%20LLVM/near/237364980" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ori Ben-Shir <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Error.20Compiling.20on.20windows.20-.20LLVM.html#237364980">(May 04 2021 at 17:20)</a>:</h4>
<p>So turns out Windows has a feature to make directories Case Sensitive in order to use it in WSL. Ninja on the other hand search all its dependencies as lower case, therefore files weren't found. I'm not sure what activated this flag on the directories I've cloned. I suspect it is related to the fact I used git bash to clone the repository.</p>



<a name="237365650"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Error%20Compiling%20on%20windows%20-%20LLVM/near/237365650" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Error.20Compiling.20on.20windows.20-.20LLVM.html#237365650">(May 04 2021 at 17:25)</a>:</h4>
<p>I believe that option is per-filesystem rather than per-directory.</p>



<a name="237365801"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Error%20Compiling%20on%20windows%20-%20LLVM/near/237365801" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Error.20Compiling.20on.20windows.20-.20LLVM.html#237365801">(May 04 2021 at 17:26)</a>:</h4>
<p>Ah, it is per-directory.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>